package org.summer.lawyer.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.summer.common.mybatis.core.page.PageQuery;
import org.summer.common.mybatis.core.page.TableDataInfo;
import org.summer.lawyer.domain.UserWithdraw;
import org.summer.lawyer.domain.bo.userwithdraw.UserWithdrawBo;
import org.summer.lawyer.domain.bo.userwithdraw.WithdrawQrcodeBo;
import org.summer.lawyer.domain.vo.userwithdraw.UserWithdrawVo;
import org.summer.lawyer.domain.vo.userwithdraw.WithdrawQrcodeVo;

import java.util.Collection;
import java.util.List;

/**
 * 用户提现记录Service接口
 *
 * @author summer
 * @date 2024-06-25
 */
public interface IUserWithdrawService extends IService<UserWithdraw>{

    /**
     * 查询用户提现记录
     *
     * @param id 主键
     * @return 用户提现记录
     */
    UserWithdrawVo selectUserWithdrawVoById(Long id);

    /**
     * 查询用户提现记录
     */
    UserWithdrawVo selectUserWithdrawVoByWithdrawNumber(String withdrawNumber);

    /**
     * 分页查询用户提现记录列表
     *
     * @param bo        查询条件
     * @param pageQuery 分页参数
     * @return 用户提现记录分页列表
     */
    TableDataInfo<UserWithdrawVo> selectPageList(UserWithdrawBo bo, PageQuery pageQuery);

    /**
     * 查询符合条件的用户提现记录列表
     *
     * @param bo 查询条件
     * @return 用户提现记录列表
     */
    List<UserWithdrawVo> selectUserWithdrawVoList(UserWithdrawBo bo);

    /**
     * 新增用户提现记录
     *
     * @param bo 用户提现记录
     * @return 是否新增成功
     */
    Boolean insertByBo(UserWithdrawBo bo);

    /**
     * 修改用户提现记录
     *
     * @param bo 用户提现记录
     * @return 是否修改成功
     */
    Boolean updateByBo(UserWithdrawBo bo);

    /**
     * 校验并批量删除用户提现记录信息
     *
     * @param ids     待删除的主键集合
     * @param isValid 是否进行有效性校验
     * @return 是否删除成功
     */
    Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);

    /**
     * 申请提现
     */
    void applyWithdraw(UserWithdrawBo bo);

    /**
     * 确认提现 并发起提现
     */
    void confirmWithdraw(UserWithdrawBo bo);

    /**
     * 驳回提现
     */
    void rejectWithdraw(UserWithdrawBo bo);

    /**
     * 更新二维码图片
     */
    void updateWithdrawQrCodeImage(WithdrawQrcodeBo bo);

    /**
     * 查询二维码图片
     */
    WithdrawQrcodeVo selectWithdrawQrcodeVoById(WithdrawQrcodeBo bo);
}
